Replication in a network environment

ABSTRACT

A method for server replication in a network environment is provided. The primary server provides a first service to a client. If the first service involves interaction with a non-deterministic data source, the primary server performs the interaction and provides information about the interaction to a secondary server that is a replica of the primary server. The secondary server uses the information about the interaction to synchronize the secondary server with the primary server.

COPYRIGHT & TRADEMARK NOTICES

A portion of the disclosure of this patent document contains material,which is subject to copyright protection. The owner has no objection tothe facsimile reproduction by any one of the patent document or thepatent disclosure, as it appears in the Patent and Trademark Officepatent file or records, but otherwise reserves all copyrightswhatsoever.

Certain marks referenced herein may be common law or registeredtrademarks of third parties affiliated or unaffiliated with theapplicant or the assignee. Use of these marks is for providing anenabling disclosure by way of example and shall not be construed tolimit the scope of the claimed subject matter to material associatedwith such marks.

TECHNICAL FIELD

The claimed subject matter relates generally to replication in a networkenvironment and, more particularly, to server replication that supportsinteractions with non-deterministic data sources.

BACKGROUND

Replication, in computing context, refers to copying, or replicating, acomputing environment (e.g., a server system) multiple times to increaseavailability of services provided through that computing environment.Each replica or copy receives the same input, performs the sameoperations, and produces the same output. As a result, the replicatedcomputing environment or server system remains operational as acollective sum, even if one of the replicas becomes non-operational.

Unfortunately, existing systems and methods for replicating a serversystem fail to efficiently support interactions with non-deterministicdata sources. A non-deterministic data source refers to a data source(e.g., a database) that may return a different output each time, inresponse to receiving the same input. For example, a database that isdynamically updated by multiple independent processes may returndifferent results for a query each time depending on the point in timein which the query is performed.

In one existing implementation, non-deterministic data sources may besupported by synchronizing the state of each replica with the state of aselected replica at certain points in time (i.e., checkpoints). Inanother existing implementation, access to each non-deterministic datasource may be synchronized using a locking mechanism. Such existingimplementations, however, result in high overhead, particularly withrespect to the time required to respond to a client request.

SUMMARY

The present disclosure is directed to systems and corresponding methodsthat facilitate replication in a network environment.

For purposes of summarizing, certain aspects, advantages, and novelfeatures have been described herein. It is to be understood that not allsuch advantages may be achieved in accordance with any one particularembodiment. Thus, the claimed subject matter may be embodied or carriedout in a manner that achieves or optimizes one advantage or group ofadvantages without achieving all advantages as may be taught orsuggested herein.

In accordance with one embodiment, a method for server replication in anetwork environment is provided. The primary server provides a firstservice to a client. If the first service involves interaction with anon-deterministic data source, the primary server performs theinteraction and provides information about the interaction to asecondary server that is a replica of the primary server. The secondaryserver uses the information about the interaction to synchronize thesecondary server with the primary server.

In accordance with another embodiment, a system comprising one or morelogic units is provided. The one or more logic units are configured toperform the functions and operations associated with the above-disclosedmethods. In accordance with yet another embodiment, a computer programproduct comprising a computer useable medium having a computer readableprogram is provided. The computer readable program when executed on acomputer causes the computer to perform the functions and operationsassociated with the above-disclosed methods.

One or more of the above-disclosed embodiments in addition to certainalternatives are provided in further detail below with reference to theattached figures. The claimed subject matter is not, however, limited toany particular embodiment disclosed.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the claimed subject matter are understood by referring tothe figures in the attached drawings, as provided below.

FIGS. 1A and 1B illustrate an exemplary network environment, inaccordance with one or more embodiments.

FIG. 2 is a flow diagram of a method for supporting interaction with anon-deterministic data source by a primary server, in accordance withone embodiment.

FIGS. 3A, 3B, and 4 are flow diagrams of methods for supportinginteraction with a non-deterministic data source, in accordance with oneor more embodiments.

FIGS. 5 and 6 are block diagrams of hardware and software environmentsin which a system of the present invention may operate, in accordancewith one or more embodiments.

Features, elements, and aspects that are referenced by the same numeralsin different figures represent the same, equivalent, or similarfeatures, elements, or aspects, in accordance with one or moreembodiments.

DETAILED DESCRIPTION

In the following, numerous specific details are set forth to provide athorough description of various embodiments of the claimed subjectmatter. Certain embodiments may be practiced without these specificdetails or with some variations in detail. In some instances, certainfeatures are described in less detail so as not to obscure other aspectsof the disclosed embodiments. The level of detail associated with eachof the elements or features should not be construed to qualify thenovelty or importance of one feature over the others.

Referring to FIG. 1A, in accordance with one embodiment, an exemplarynetwork environment 100 comprises a server cluster 110 for providingservices to one or more clients 120. A server cluster refers to a groupof one or more servers (e.g., computing environments or machines) thatare configured desirably as replicas, or identical copies, of oneanother. A server refers to a computing system that provides services toa client. A client refers to a computing system that requests andreceives services provided by a server.

The services provided to the clients 120 by the server cluster 110 mayinvolve interaction with one or more data sources 130, 140. A datasource refers to a logical entity (e.g., a data structure) or acomputing system (e.g., a database system), or a combination of thereof,from which data can be retrieved. It is noteworthy that a data sourcemay be external to a server or client, as shown in FIG. 1A, or comprisedwithin a server or client (not shown). Each deterministic data source130 returns the same output each time, in response to receiving the sameinput. Each non-deterministic data source 140, however, may return adifferent output each time, in response to receiving the same input.

Referring to FIGS. 1A and 1B, in accordance with one embodiment, one ormore servers 170, 180 may be utilized to implement a server cluster 110.An application layer 150 may be implemented over the servers 170, 180 toexecute one or more software applications to service clients 120. Atransport layer 160 may be implemented over the servers 170, 180 toprovide a means of communication between the servers 170, 180 and theclients 120 using a reliable messaging protocol. The transport layer 160may also provide one or more communication channels 190 for reliablemessaging within the server cluster 110. A dedicated communicationchannel 190 may be provided for communication between the primary server170 and each of the secondary servers 180.

In some embodiments, the application and communication functionalitiesmay be implemented as separate, independent layers to allow for a lesscomplex system configuration and to desirably facilitate the use of acommon transport layer by different applications. Alternatively, theapplication and communication functionalities may be combined into asingle layer or divided into more than two layers. It is noteworthythat, in the embodiments provided below, certain functionalitiesattributed to one layer may be performed by another layer.

Referring back to FIGS. 1A and 1B, the server cluster 110 may utilize asynchronization mechanism (not shown). The synchronization mechanism mayconfigure one of the servers in the server cluster 110 to be a primaryserver 170 (e.g., a master server) and the remaining servers in theserver cluster 110 to be secondary servers 180 according to adistributed election protocol. The primary server 170 may be configuredto directly communicate with the data sources 130, 140 and synchronizecommunications between the servers 170, 180 in the server cluster 110and the data sources 130, 140.

In the following descriptions, the synchronization mechanism isdisclosed as being implemented over the transport layer 160, by way ofexample. It is noteworthy, however, that the same or a similarsynchronization mechanism may be implemented over the application layer150, another layer in the network environment 100, or a combination ofdifferent layers or systems.

Additionally, in the following, interaction with a non-deterministicdata source 140 has been defined as triggered by receiving a messagefrom a client 120. It is noteworthy, however, that the interaction maybe triggered by other system components or means, and, once the triggeris invoked, the primary server 170 may forward a message to itself andthe secondary servers 180 to perform the interaction, for example.

Referring to FIGS. 1A, 1B, and 2, in accordance with one embodiment, thetransport layer 160 on the primary server 170 or a secondary server 180receives a message from a client 120 and forwards the client message tothe application layer 150 on the primary server 170 for processing(P200).

In one implementation, the client message may be associated with asequence number or other identification to enable the application layer150 to process client messages according to a certain order. Processingclient messages according to a certain order (e.g., according tosequence number) causes the primary server 170 and the secondary servers180 to process each client message in accordance with the same logic orstate.

If processing the client message does not involve any interactions witha non-deterministic data source 140 (P210), the application layer 150 onthe primary server 170 forwards a confirmation message to each secondaryserver 180, desirably by way of a dedicated communication channel 190,to indicate that the secondary server 180 may process the client message(P250). In one implementation, the confirmation message may be forwardedonce the primary server 170 completes processing the client message.Alternatively, the confirmation message may be forwarded periodically orafter a certain number of client messages have been processed toincrease efficiency.

Otherwise, if processing the client message involves one or moreinteractions with a non-deterministic data source 140, the applicationlayer 150 on the primary server 170 performs the interactions, and foreach interaction, desirably generates a separate message based on therespective interaction (P220).

An interaction-based message comprises information relevant to thesecondary servers 180 for processing the client message in the samemanner as the primary server 170. The content of the interaction-basedmessage may provide information about the interaction or the results ofthe interaction (e.g., that the primary server 170 has locked a databaserecord), for example. Desirably, the detection of an interaction-basedmessage may by itself be used to indicate that there is an interactionto be synchronized with the secondary servers 180, for example.

Upon generating the interaction-based messages, the transport layer 160on the primary server 170 forwards the interaction-based messages toeach secondary server 180 desirably by way of the dedicatedcommunication channels 190 (P230). Once the interaction-based messageshave been successfully forwarded to each secondary server 180 (P240),the transport layer 160 on the primary server 170 forwards aconfirmation message to each secondary server 180, by way of thededicated communication channels 190, to indicate that the secondaryserver 180 may process the client message (P250).

In one implementation, the application layer 150 on the primary server170 may determine that the interaction-based messages have beensuccessfully forwarded to each secondary server 180 upon being informedto that effect by the transport layer 160. The transport layer 160 mayinform the application layer 150 that the interaction-based messageshave been successfully forwarded to each secondary server 180, forexample, in response to receiving a message acknowledging receipt of theinteraction-based message from each secondary server 180.

Referring to FIGS. 1A, 1B, and 3A, in accordance with one embodiment,the transport layer 160 on a secondary server 180 receives aninteraction-based message from the primary server 170 by way of adedicated communication channel 190 (P300).

In response to receiving the generated message, the transport layer 160forwards a message confirming receipt of the interaction-based messageto the primary server 170, by way of the 190 communication channel(P310). The transport layer 160 also forwards the interaction-basedmessage to the application layer 150 on the secondary server 180.

Upon receiving the interaction-based message, the application layer 150holds the interaction-based message (e.g., in a buffer or queue) untilthe secondary server 180 uses the interaction-based message to processthe client message (P320). In one implementation, the interaction-basedmessage may be stored according to a certain order or associated with asequence number or other identification to enable the application layer150 to use the interaction-based messages according to the certainorder.

Referring to FIGS. 1A, 1B, and 3B, in accordance with one embodiment,the transport layer 160 on a secondary server 180 receives a messagefrom the primary server 170, by way of a dedicated communication channel190, permitting the application layer 150 on the secondary server 180 toprocess a message received from a client 120 (P330). In oneimplementation, the client message may be associated with a sequencenumber or other identification to enable the application layer 150 toprocess the client message according to a certain order.

Once the application layer 150 on the secondary server 180 is permittedto process the client message, the application layer 150 on thesecondary server 180 determines whether there are any interaction-basedmessages being held for processing of the client message (P340). If so,the application layer 150 on the secondary server 180 retrieves theinteraction-based messages and uses the interaction-based messagesaccording to the certain order to process the client message (P350) anddiscards the interaction-based messages (P360).

Preventing the application layer 150 on the secondary server 180 fromprocessing the client message until permission is received from theprimary server 170 causes the application layer 150 on the secondaryserver 180 to process the client message after receiving eachinteraction-based message generated for the client message. Since theinteraction-based messages are retrieved and used according to a certainorder, the primary server 170 and the secondary servers 180 arrive atthe same logic point or state after processing each client message.

For example, before processing the client message, the primary server170 and a secondary server 180 may be at the same logic point A. Oncethe primary server 170 starts processing the client message and performsan interaction D1 with a non-deterministic data source, the primaryserver 170 may arrive at logic state B; and, once the primary server 170performs an interaction D2 with a non-deterministic data source, theprimary server 170 may arrive at logic state C. Then, once the primaryserver 170 finishes processing the client message, the primary server170 may arrive at logic state D.

In the above example, if the secondary server 180 waits to process theclient message until receiving interaction-based messages M1 and M2generated for the interactions D1 and D2, respectively, the secondaryserver 180 may be able to process the client message in the same manneras the primary server 170 and arrive at the same logic state uponfinishing. During the processing, the secondary server 180 may use themessage M1 instead of performing the interaction D1 to arrive at logicstate B and the message M2 instead of performing the interaction D2 toarrive at logic state C. Then, once the primary server 180 finishesprocessing the client message, the secondary server 180 may arrive atlogic state D.

In certain scenarios, a secondary server 180 may utilize the content ofan interaction-based message to process a client message. For example, aserver may retrieve data from a database (i.e., perform an interactionwith a data source) and provide the data to a client, in response toreceiving a data request (i.e., client message). In such a scenario, thecontent of the interaction-based message may include the data, and thedata may be provided to the client 120.

In other scenarios, a secondary server 180 may utilize the existence ofan interaction-based message to process a client message. For example, asecondary server 180 may perform a default action independent of thecontent of an interaction-based message, in response to receiving theinteraction-based message from the primary server 170.

Referring to FIGS. 1A, 1B, and 4, in accordance with one embodiment, theprimary server 170 may generate an interaction-based message to asecondary server 180 according to one or more conditions.

If one or more conditions for generating an interaction-based messagedfor a client message are satisfied (P400), the primary server 170generates and forwards the interaction-based message to the secondaryserver 180 (P410), and the secondary server 180 processes the clientmessage according to the content of the interaction-based message or byperforming a first default action independent of the content of theinteraction-based message (P420). Otherwise, the primary server 170 doesnot generate and forward the interaction-based message to the secondaryserver 180; and the secondary server 180 processes the client message byperforming a second default action, in response to failing to receivethe interaction-based message (P430).

For example, a server may provide online shopping services to a client,which involves validating a purchase order (i.e., performing aninteraction with a data source), in response to receiving the purchaseorder (i.e., client message) from a client. In such a scenario, theapplication layer 150 on the server may generate an interaction-basedmessage if the validation fails, but may not generate theinteraction-based message if the validation succeeds.

Desirably, limiting the generation of an interaction-based messageaccording to one or more conditions significantly increases theperformance of a server cluster by reducing the number of messagesforwarded within the server cluster (i.e., between the primary server170 and each secondary server 180).

Advantageously, the above systems and methods support efficient serverreplication even if there are interactions with non-deterministic datasources. As provided earlier, the servers are desirably identical ateach point in the input, or message, stream. Thus, if one of the serversfails, there is no need to perform costly state exchange or rollbacks.

In different embodiments, the claimed subject matter may be implementedeither entirely in the form of hardware or entirely in the form ofsoftware, or a combination of both hardware and software elements. Forexample, the primary server 170 or a secondary server 180 may comprise acontrolled computing system environment that can be presented largely interms of hardware components and software code executed to performprocesses that achieve the results contemplated by the system of theclaimed subject matter.

Referring to FIGS. 1A, 1B, 5, and 6, a computing system environment inaccordance with an exemplary embodiment is composed of a hardwareenvironment 1110 and a software environment 1120. The hardwareenvironment 1110 comprises the machinery and equipment that provide anexecution environment for the software; and the software provides theexecution instructions for the hardware as provided below.

As provided here, the software elements that are executed on theillustrated hardware elements are described in terms of specificlogical/functional relationships. It should be noted, however, that therespective methods implemented in software may be also implemented inhardware by way of configured and programmed processors, ASICs(application specific integrated circuits), FPGAs (Field ProgrammableGate Arrays) and DSPs (digital signal processors), for example.

Software environment 1120 is divided into two major classes comprisingsystem software 1121 and application software 1122. In one embodiment,the application layer 150 or transport layer 160 may be implemented assystem software 1121 or application software 1122 executed on one ormore hardware environments to implement server replication that supportsinteractions with non-deterministic data sources.

System software 1121 may comprise control programs, such as theoperating system (OS) and information management systems that instructthe hardware how to function and process information. Applicationsoftware 1122 may comprise but is not limited to program code, datastructures, firmware, resident software, microcode or any other form ofinformation or routine that may be read, analyzed or executed by amicrocontroller.

In an alternative embodiment, the claimed subject matter may beimplemented as computer program product accessible from acomputer-usable or computer-readable medium providing program code foruse by or in connection with a computer or any instruction executionsystem. For the purposes of this description, a computer-usable orcomputer-readable medium may be any apparatus that can contain, store,communicate, propagate or transport the program for use by or inconnection with the instruction execution system, apparatus or device.

The computer-readable medium may be an electronic, magnetic, optical,electromagnetic, infrared, or semiconductor system (or apparatus ordevice) or a propagation medium. Examples of a computer-readable mediuminclude a semiconductor or solid-state memory, magnetic tape, aremovable computer diskette, a random access memory (RAM), a read-onlymemory (ROM), a rigid magnetic disk and an optical disk. Currentexamples of optical disks include compact disk read only memory(CD-ROM), compact disk read/write (CD-R/W) and digital video disk (DVD).

Referring to FIG. 5, an embodiment of the application software 1122 maybe implemented as computer software in the form of computer readablecode executed on a data processing system such as hardware environment1110 that comprises a processor 1101 coupled to one or more memoryelements by way of a system bus 1100. The memory elements, for example,may comprise local memory 1102, storage media 1106, and cache memory1104. Processor 1101 loads executable code from storage media 1106 tolocal memory 1102. Cache memory 1104 provides temporary storage toreduce the number of times code is loaded from storage media 1106 forexecution.

A user interface device 1105 (e.g., keyboard, pointing device, etc.) anda display screen 1107 can be coupled to the computing system eitherdirectly or through an intervening I/O controller 1103, for example. Acommunication interface unit 1108, such as a network adapter, may bealso coupled to the computing system to enable the data processingsystem to communicate with other data processing systems or remoteprinters or storage devices through intervening private or publicnetworks. Wired or wireless modems and Ethernet cards are a few of theexemplary types of network adapters.

In one or more embodiments, hardware environment 1110 may not includeall the above components, or may comprise other components foradditional functionality or utility. For example, hardware environment1110 can be a laptop computer or other portable computing deviceembodied in an embedded system such as a set-top box, a personal dataassistant (PDA), a mobile communication unit (e.g., a wireless phone),or other similar hardware platforms that have information processingand/or data storage and communication capabilities.

In some embodiments of the system, communication interface 1108communicates with other systems by sending and receiving electrical,electromagnetic or optical signals that carry digital data streamsrepresenting various types of information including program code. Thecommunication may be established by way of a remote network (e.g., theInternet), or alternatively by way of transmission over a carrier wave.

Referring to FIG. 6, application software 1122 may comprise one or morecomputer programs that are executed on top of system software 1121 afterbeing loaded from storage media 1106 into local memory 1102. In aclient-server architecture, application software 1122 may compriseclient software and server software. For example, in one embodiment,client software is executed on the clients 120 and server software isexecuted on the primary server 170 and the secondary servers 180

Software environment 1120 may also comprise browser software 1126 foraccessing data available over local or remote computing networks.Further, software environment 1120 may comprise a user interface 1124(e.g., a Graphical User Interface (GUI)) for receiving user commands anddata. Please note that the hardware and software architectures andenvironments described above are for purposes of example, and one ormore embodiments of the invention may be implemented over any type ofsystem architecture or processing environment.

It should also be understood that the logic code, programs, modules,processes, methods and the order in which the respective processes ofeach method are performed are purely exemplary. Depending onimplementation, the processes can be performed in any order or inparallel, unless indicated otherwise in the present disclosure. Further,the logic code is not related, or limited to any particular programminglanguage, and may comprise of one or more modules that execute on one ormore processors in a distributed, non-distributed or multiprocessingenvironment.

The claimed subject matter has been described above with reference toone or more features or embodiments. Those skilled in the art willrecognize, however, that changes and modifications may be made to theseembodiments without departing from the scope of the claimed subjectmatter. These and various other adaptations and combinations of theembodiments disclosed are within the scope of the claimed subject matteras defined by the claims and their full scope of equivalents.

What is claimed is:
 1. A method of server state replication in a networkenvironment, the method comprising: processing, at a primary server, amessage received from a client; determining whether the processing ofthe message involves interaction with a non-deterministic data source;if the processing of the message does not involve interaction with anon-deterministic data source, processing the message at the primaryserver and sending a notification, to a secondary server that is abackup of the primary server, that the primary server has finishedprocessing the message, wherein the secondary server also received themessage from the client and is configured to process the message; and ifthe processing of the message does involve interaction with anon-deterministic data source, processing the message at the primaryserver by interacting with the non-deterministic data source,conditionally sending to the secondary server, or withholding from thesecondary server, information related to the interaction, wherein thesecondary server is configured to process the message withoutinteracting with the non-deterministic data source whether or not theinformation is sent to the secondary server, and sending a notificationto the secondary server that the primary server has finished processingthe message, wherein the processing and sending steps are embodied inany of a) computer hardware, and b) computer software embodied in anon-transitory computer-readable medium.
 2. The method according toclaim 1 wherein the sending of the notification is sent periodically. 3.The method according to claim 1 wherein the sending of the notificationis sent after a predefined number of client messages have been processedby the primary server.
 4. The method of claim 1 and further comprisingdetermining at the primary server that the information related toresults of the interaction between the primary server and thenon-deterministic data source has been received by the secondary server.5. The method of claim 4 and further comprising permitting the secondaryserver to process the message in response to determining that theinformation related to results of the interaction between the primaryserver and the non-deterministic data source has been received by thesecondary server.
 6. A method of server state replication in a networkenvironment, the method comprising: receiving, at a secondary serverthat is a backup of a primary server, a message from a client, whereinthe secondary server is configured to process the message usinginformation related to results of an interaction between the primaryserver and a non-deterministic data source if the results are receivedby the secondary server, and process the message absent receipt of theinformation, and wherein the interaction between the primary server andthe non-deterministic data source is performed by the primary serverresponsive to the primary server also receiving the message from theclient; receiving, at the secondary server, an instruction to processthe message from the client; and processing, at the secondary server,the message from the client without interacting with thenon-deterministic data source, wherein the receiving and processingsteps are embodied in any of a) computer hardware, and b) computersoftware embodied in a non-transitory computer-readable medium.
 7. Themethod according to claim 6 wherein the processing step comprisesperforming a default action that is independent of the content of theinformation.
 8. The method according to claim 6 wherein the processingstep comprises processing the message absent receipt of the informationby performing a default action that is associated with non-receipt ofinformation.